<!-- HTML header for doxygen 1.9.6-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>COMMONS-NET: commonsNet.ntp.TimeInfo类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
  $(document).ready(function() { init_search(); });
/* @license-end */
</script>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">COMMONS-NET
   </div>
  </td>
    <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <span id="MSearchSelect"                onmouseover="return searchBox.OnSearchSelectShow()"                onmouseout="return searchBox.OnSearchSelectHide()">&#160;</span>
          <input type="text" id="MSearchField" value="" placeholder="搜索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.6 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('classcommonsNet_1_1ntp_1_1TimeInfo.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">载入中...</div>
<div class="SRStatus" id="Searching">搜索中...</div>
<div class="SRStatus" id="NoMatches">未找到</div>
</div>
</div>
</div>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pri-attribs">Private 属性</a> &#124;
<a href="classcommonsNet_1_1ntp_1_1TimeInfo-members.html">所有成员列表</a>  </div>
  <div class="headertitle"><div class="title">commonsNet.ntp.TimeInfo类 参考</div></div>
</div><!--header-->
<div class="contents">

<p>用于处理网络时间包消息（如 NTP 等），计算相关的计时信息和统计数据。  
 <a href="classcommonsNet_1_1ntp_1_1TimeInfo.html#details">更多...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a50fbb3205951af1064dcaeb7f6a43ae7"><td class="memItemLeft" align="right" valign="top">public&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1ntp_1_1TimeInfo.html#a50fbb3205951af1064dcaeb7f6a43ae7">init</a> (message: ?<a class="el" href="classcommonsNet_1_1ntp_1_1NtpV3Packet.html">NtpV3Packet</a>, returnTimeMillis: Int64)</td></tr>
<tr class="memdesc:a50fbb3205951af1064dcaeb7f6a43ae7"><td class="mdescLeft">&#160;</td><td class="mdescRight">使用原始数据包消息和接收到的目标时间创建一个 TimeInfo 对象。  <br /></td></tr>
<tr class="separator:a50fbb3205951af1064dcaeb7f6a43ae7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a29aa97c08d34412f9c42f227bc132017"><td class="memItemLeft" align="right" valign="top">public&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1ntp_1_1TimeInfo.html#a29aa97c08d34412f9c42f227bc132017">init</a> (message: ?<a class="el" href="classcommonsNet_1_1ntp_1_1NtpV3Packet.html">NtpV3Packet</a>, returnTimeMillis: Int64, doComputeDetails: Bool)</td></tr>
<tr class="memdesc:a29aa97c08d34412f9c42f227bc132017"><td class="mdescLeft">&#160;</td><td class="mdescRight">使用原始数据包消息和接收到的目标时间创建一个 TimeInfo 对象，并对 TimeInfo 的 computeDetails 标志为进行设置， 如果为 true ,则自动计算延迟/偏移值，否则需要调用computeDetails()时进行计算。  <br /></td></tr>
<tr class="separator:a29aa97c08d34412f9c42f227bc132017"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0e28bdf39db170ae33bb688e179ef20d"><td class="memItemLeft" align="right" valign="top">public&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1ntp_1_1TimeInfo.html#a0e28bdf39db170ae33bb688e179ef20d">init</a> (message: ?<a class="el" href="classcommonsNet_1_1ntp_1_1NtpV3Packet.html">NtpV3Packet</a>, returnTimeMillis: Int64, comments: ArrayList&lt;String&gt;)</td></tr>
<tr class="memdesc:a0e28bdf39db170ae33bb688e179ef20d"><td class="mdescLeft">&#160;</td><td class="mdescRight">使用原始数据包消息和接收到的目标时间创建一个 TimeInfo 对象。  <br /></td></tr>
<tr class="separator:a0e28bdf39db170ae33bb688e179ef20d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9671db2c2ffd53eeaf5e9e2ea909fd8c"><td class="memItemLeft" align="right" valign="top">public&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1ntp_1_1TimeInfo.html#a9671db2c2ffd53eeaf5e9e2ea909fd8c">init</a> (message: ?<a class="el" href="classcommonsNet_1_1ntp_1_1NtpV3Packet.html">NtpV3Packet</a>, returnTimeMillis: Int64, comments: ?ArrayList&lt;String&gt;, doComputeDetails: Bool)</td></tr>
<tr class="memdesc:a9671db2c2ffd53eeaf5e9e2ea909fd8c"><td class="mdescLeft">&#160;</td><td class="mdescRight">使用原始数据包消息和接收到的目标时间创建一个 TimeInfo 对象，并对 TimeInfo 的 computeDetails 标志为进行设置， 如果为 true ,则自动计算延迟/偏移值，否则需要调用computeDetails()时进行计算。  <br /></td></tr>
<tr class="separator:a9671db2c2ffd53eeaf5e9e2ea909fd8c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0f04954930906c7b5d47248ad0537cfa"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1ntp_1_1TimeInfo.html#a0f04954930906c7b5d47248ad0537cfa">addComment</a> (comment: String): Unit</td></tr>
<tr class="memdesc:a0f04954930906c7b5d47248ad0537cfa"><td class="mdescLeft">&#160;</td><td class="mdescRight">添加错误/警告信息到 TimeInfo 中的相关存储列表中。如果列表不存在，则创建一个。  <br /></td></tr>
<tr class="separator:a0f04954930906c7b5d47248ad0537cfa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ada7b675a54a2484976e27ec6c7ced260"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1ntp_1_1TimeInfo.html#ada7b675a54a2484976e27ec6c7ced260">computeDetails</a> (): Unit</td></tr>
<tr class="memdesc:ada7b675a54a2484976e27ec6c7ced260"><td class="mdescLeft">&#160;</td><td class="mdescRight">计算并验证 NTP 消息包的细节。计算出偏移和延迟的时间。  <br /></td></tr>
<tr class="separator:ada7b675a54a2484976e27ec6c7ced260"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a57abb6f3d8884bccf4e552b103212ead"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1ntp_1_1TimeInfo.html#a57abb6f3d8884bccf4e552b103212ead">equals</a> (obj: ?Object): Bool</td></tr>
<tr class="memdesc:a57abb6f3d8884bccf4e552b103212ead"><td class="mdescLeft">&#160;</td><td class="mdescRight">将此对象与指定的对象进行比较。当比较对象为一个包含与此对象相同值的 TimeStamp 对象时返回 true ，否则返回 false 。  <br /></td></tr>
<tr class="separator:a57abb6f3d8884bccf4e552b103212ead"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a86759e99c3af99504ec96df7ede1fd87"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1ntp_1_1TimeInfo.html#a86759e99c3af99504ec96df7ede1fd87">getlocalAddress</a> (): ?IPSocketAddress</td></tr>
<tr class="memdesc:a86759e99c3af99504ec96df7ede1fd87"><td class="mdescLeft">&#160;</td><td class="mdescRight">从消息数据报中获取本地主机地址（如果有）  <br /></td></tr>
<tr class="separator:a86759e99c3af99504ec96df7ede1fd87"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af1bf3861e46e81928538afe1eadf8aec"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1ntp_1_1TimeInfo.html#af1bf3861e46e81928538afe1eadf8aec">getremoteAddress</a> (): ?IPSocketAddress</td></tr>
<tr class="memdesc:af1bf3861e46e81928538afe1eadf8aec"><td class="mdescLeft">&#160;</td><td class="mdescRight">从消息数据报中获取远程主机地址（如果有）  <br /></td></tr>
<tr class="separator:af1bf3861e46e81928538afe1eadf8aec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa3df803df8237a578050d7b1309eb966"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1ntp_1_1TimeInfo.html#aa3df803df8237a578050d7b1309eb966">getComments</a> (): ?ArrayList&lt;String&gt;</td></tr>
<tr class="memdesc:aa3df803df8237a578050d7b1309eb966"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取存储处理过程中的错误/警告信息的列表。  <br /></td></tr>
<tr class="separator:aa3df803df8237a578050d7b1309eb966"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad4942105a923a7af6ad100aca2feebed"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1ntp_1_1TimeInfo.html#ad4942105a923a7af6ad100aca2feebed">getDelay</a> (): Int64</td></tr>
<tr class="memdesc:ad4942105a923a7af6ad100aca2feebed"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取往返网络延迟。  <br /></td></tr>
<tr class="separator:ad4942105a923a7af6ad100aca2feebed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5b0733fd064f25cc728bec1701b155a5"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1ntp_1_1TimeInfo.html#a5b0733fd064f25cc728bec1701b155a5">getMessage</a> (): <a class="el" href="classcommonsNet_1_1ntp_1_1NtpV3Packet.html">NtpV3Packet</a></td></tr>
<tr class="memdesc:a5b0733fd064f25cc728bec1701b155a5"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取 NTP 消息包。  <br /></td></tr>
<tr class="separator:a5b0733fd064f25cc728bec1701b155a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa0bbeb50ff8cdbc30fb02a707b72f0a9"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1ntp_1_1TimeInfo.html#aa0bbeb50ff8cdbc30fb02a707b72f0a9">getOffset</a> (): Int64</td></tr>
<tr class="memdesc:aa0bbeb50ff8cdbc30fb02a707b72f0a9"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取调整本地时钟以匹配远程时钟所需的时钟偏移量。  <br /></td></tr>
<tr class="separator:aa0bbeb50ff8cdbc30fb02a707b72f0a9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad90587d04e50fec0beb74d421bd699b9"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1ntp_1_1TimeInfo.html#ad90587d04e50fec0beb74d421bd699b9">getReturnTime</a> (): Int64</td></tr>
<tr class="memdesc:ad90587d04e50fec0beb74d421bd699b9"><td class="mdescLeft">&#160;</td><td class="mdescRight">返回本地机器接收到时间消息包的时间。  <br /></td></tr>
<tr class="separator:ad90587d04e50fec0beb74d421bd699b9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a14ac543542bfbde8bfd4e8e39721775e"><td class="memItemLeft" align="right" valign="top">public func&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1ntp_1_1TimeInfo.html#a14ac543542bfbde8bfd4e8e39721775e">hashCode</a> (): Int32</td></tr>
<tr class="memdesc:a14ac543542bfbde8bfd4e8e39721775e"><td class="mdescLeft">&#160;</td><td class="mdescRight">为此对象计算哈希码。结果是返回时间和消息哈希码的异或结果。  <br /></td></tr>
<tr class="separator:a14ac543542bfbde8bfd4e8e39721775e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-attribs" name="pri-attribs"></a>
Private 属性</h2></td></tr>
<tr class="memitem:a7567948cb327ea655fc4a25b180e9570"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1ntp_1_1TimeInfo.html#a7567948cb327ea655fc4a25b180e9570">let message</a> : <a class="el" href="classcommonsNet_1_1ntp_1_1NtpV3Packet.html">NtpV3Packet</a></td></tr>
<tr class="memdesc:a7567948cb327ea655fc4a25b180e9570"><td class="mdescLeft">&#160;</td><td class="mdescRight">NTP 消息包。  <br /></td></tr>
<tr class="separator:a7567948cb327ea655fc4a25b180e9570"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae1de23ad09470ca0b05942db8b349452"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1ntp_1_1TimeInfo.html#ae1de23ad09470ca0b05942db8b349452">var comments</a> : ?ArrayList&lt;String&gt;</td></tr>
<tr class="memdesc:ae1de23ad09470ca0b05942db8b349452"><td class="mdescLeft">&#160;</td><td class="mdescRight">存储处理过程中的错误/警告信息的列表。  <br /></td></tr>
<tr class="separator:ae1de23ad09470ca0b05942db8b349452"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeb19bb9c73ae38927cc229822ad412c3"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1ntp_1_1TimeInfo.html#aeb19bb9c73ae38927cc229822ad412c3">var delayMillis</a> : Int64</td></tr>
<tr class="memdesc:aeb19bb9c73ae38927cc229822ad412c3"><td class="mdescLeft">&#160;</td><td class="mdescRight">延迟毫秒数。  <br /></td></tr>
<tr class="separator:aeb19bb9c73ae38927cc229822ad412c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a30626b35429ced55563e9eb6adcc4689"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1ntp_1_1TimeInfo.html#a30626b35429ced55563e9eb6adcc4689">var offsetMillis</a> : Int64</td></tr>
<tr class="memdesc:a30626b35429ced55563e9eb6adcc4689"><td class="mdescLeft">&#160;</td><td class="mdescRight">偏移毫秒数。  <br /></td></tr>
<tr class="separator:a30626b35429ced55563e9eb6adcc4689"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a12a3795e895fe22e9c44b54fa9281504"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1ntp_1_1TimeInfo.html#a12a3795e895fe22e9c44b54fa9281504">let returnTimeMillis</a> : Int64</td></tr>
<tr class="memdesc:a12a3795e895fe22e9c44b54fa9281504"><td class="mdescLeft">&#160;</td><td class="mdescRight">本地机器接收到时间消息包的时间。  <br /></td></tr>
<tr class="separator:a12a3795e895fe22e9c44b54fa9281504"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac95f21d3a6452a13dbce9cee3874069f"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcommonsNet_1_1ntp_1_1TimeInfo.html#ac95f21d3a6452a13dbce9cee3874069f">var detailsComputed</a> : Bool = false</td></tr>
<tr class="memdesc:ac95f21d3a6452a13dbce9cee3874069f"><td class="mdescLeft">&#160;</td><td class="mdescRight">标志位，表示 TimeInfo 的详细信息是否已处理并计算出延迟/偏移值  <br /></td></tr>
<tr class="separator:ac95f21d3a6452a13dbce9cee3874069f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>用于处理网络时间包消息（如 NTP 等），计算相关的计时信息和统计数据。 </p>
</div><h2 class="groupheader">构造及析构函数说明</h2>
<a id="a50fbb3205951af1064dcaeb7f6a43ae7" name="a50fbb3205951af1064dcaeb7f6a43ae7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a50fbb3205951af1064dcaeb7f6a43ae7">&#9670;&#160;</a></span>init() <span class="overload">[1/4]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public commonsNet.ntp.TimeInfo.init </td>
          <td>(</td>
          <td class="paramname"><em>message</em>:&#160;</td>
          <td class="paramtype">?NtpV3Packet, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramname"><em>returnTimeMillis</em>:&#160;</td>
          <td class="paramtype">Int64&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>使用原始数据包消息和接收到的目标时间创建一个 TimeInfo 对象。 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">message</td><td>NTP消息包 </td></tr>
    <tr><td class="paramname">returnTimeMillis</td><td>目标接收时间 </td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>异常</dt><dd>
  <table class="exception">
    <tr><td class="paramname">IllegalArgumentException</td><td>传入的原始数据包消息为 None </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a29aa97c08d34412f9c42f227bc132017" name="a29aa97c08d34412f9c42f227bc132017"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a29aa97c08d34412f9c42f227bc132017">&#9670;&#160;</a></span>init() <span class="overload">[2/4]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public commonsNet.ntp.TimeInfo.init </td>
          <td>(</td>
          <td class="paramname"><em>message</em>:&#160;</td>
          <td class="paramtype">?NtpV3Packet, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramname"><em>returnTimeMillis</em>:&#160;</td>
          <td class="paramtype">Int64, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramname"><em>doComputeDetails</em>:&#160;</td>
          <td class="paramtype">Bool&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>使用原始数据包消息和接收到的目标时间创建一个 TimeInfo 对象，并对 TimeInfo 的 computeDetails 标志为进行设置， 如果为 true ,则自动计算延迟/偏移值，否则需要调用computeDetails()时进行计算。 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">msgPacket</td><td>NTP消息包 </td></tr>
    <tr><td class="paramname">returnTimeMillis</td><td>目标接收时间 </td></tr>
    <tr><td class="paramname">doComputeDetails</td><td>标志位，用于预先计算延迟/偏移值 </td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>异常</dt><dd>
  <table class="exception">
    <tr><td class="paramname">IllegalArgumentException</td><td>传入的原始数据包消息为 None </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a0e28bdf39db170ae33bb688e179ef20d" name="a0e28bdf39db170ae33bb688e179ef20d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0e28bdf39db170ae33bb688e179ef20d">&#9670;&#160;</a></span>init() <span class="overload">[3/4]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public commonsNet.ntp.TimeInfo.init </td>
          <td>(</td>
          <td class="paramname"><em>message</em>:&#160;</td>
          <td class="paramtype">?NtpV3Packet, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramname"><em>returnTimeMillis</em>:&#160;</td>
          <td class="paramtype">Int64, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramname"><em>comments</em>:&#160;</td>
          <td class="paramtype">ArrayList&lt;String&gt;&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>使用原始数据包消息和接收到的目标时间创建一个 TimeInfo 对象。 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">message</td><td>NTP消息包 </td></tr>
    <tr><td class="paramname">returnTimeMillis</td><td>目标接收时间 </td></tr>
    <tr><td class="paramname">comments</td><td>处理过程中识别的错误/警告信息列表 </td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>异常</dt><dd>
  <table class="exception">
    <tr><td class="paramname">IllegalArgumentException</td><td>传入的原始数据包消息为 None </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a9671db2c2ffd53eeaf5e9e2ea909fd8c" name="a9671db2c2ffd53eeaf5e9e2ea909fd8c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9671db2c2ffd53eeaf5e9e2ea909fd8c">&#9670;&#160;</a></span>init() <span class="overload">[4/4]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public commonsNet.ntp.TimeInfo.init </td>
          <td>(</td>
          <td class="paramname"><em>message</em>:&#160;</td>
          <td class="paramtype">?NtpV3Packet, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramname"><em>returnTimeMillis</em>:&#160;</td>
          <td class="paramtype">Int64, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramname"><em>comments</em>:&#160;</td>
          <td class="paramtype">?ArrayList&lt;String&gt;, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramname"><em>doComputeDetails</em>:&#160;</td>
          <td class="paramtype">Bool&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>使用原始数据包消息和接收到的目标时间创建一个 TimeInfo 对象，并对 TimeInfo 的 computeDetails 标志为进行设置， 如果为 true ,则自动计算延迟/偏移值，否则需要调用computeDetails()时进行计算。 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">message</td><td>NTP消息包 </td></tr>
    <tr><td class="paramname">returnTimeMillis</td><td>目标接收时间(毫秒) </td></tr>
    <tr><td class="paramname">comments</td><td>处理过程中识别的错误/警告信息列表 </td></tr>
    <tr><td class="paramname">doComputeDetails</td><td>标志位，用于预先计算延迟/偏移值 </td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>异常</dt><dd>
  <table class="exception">
    <tr><td class="paramname">IllegalArgumentException</td><td>传入的原始数据包消息为 None </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a id="a0f04954930906c7b5d47248ad0537cfa" name="a0f04954930906c7b5d47248ad0537cfa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0f04954930906c7b5d47248ad0537cfa">&#9670;&#160;</a></span>addComment()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public func commonsNet.ntp.TimeInfo.addComment </td>
          <td>(</td>
          <td class="paramname"><em>comment</em>:&#160;</td>
          <td class="paramtype">String</td><td>)</td>
          <td>: Unit </td>
        </tr>
      </table>
</div><div class="memdoc">

<p>添加错误/警告信息到 TimeInfo 中的相关存储列表中。如果列表不存在，则创建一个。 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">comment</td><td>要添加的信息 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ada7b675a54a2484976e27ec6c7ced260" name="ada7b675a54a2484976e27ec6c7ced260"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ada7b675a54a2484976e27ec6c7ced260">&#9670;&#160;</a></span>computeDetails()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public func commonsNet.ntp.TimeInfo.computeDetails </td>
          <td>(</td>
          <td class="paramtype"></td><td>)</td>
          <td>: Unit </td>
        </tr>
      </table>
</div><div class="memdoc">

<p>计算并验证 NTP 消息包的细节。计算出偏移和延迟的时间。 </p>

</div>
</div>
<a id="a57abb6f3d8884bccf4e552b103212ead" name="a57abb6f3d8884bccf4e552b103212ead"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a57abb6f3d8884bccf4e552b103212ead">&#9670;&#160;</a></span>equals()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public func commonsNet.ntp.TimeInfo.equals </td>
          <td>(</td>
          <td class="paramname"><em>obj</em>:&#160;</td>
          <td class="paramtype">?Object</td><td>)</td>
          <td>: Bool </td>
        </tr>
      </table>
</div><div class="memdoc">

<p>将此对象与指定的对象进行比较。当比较对象为一个包含与此对象相同值的 TimeStamp 对象时返回 true ，否则返回 false 。 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">obj</td><td>要与之比较的对象 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>如果对象相同则为 true ；否则为 false </dd></dl>

</div>
</div>
<a id="aa3df803df8237a578050d7b1309eb966" name="aa3df803df8237a578050d7b1309eb966"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa3df803df8237a578050d7b1309eb966">&#9670;&#160;</a></span>getComments()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public func commonsNet.ntp.TimeInfo.getComments </td>
          <td>(</td>
          <td class="paramtype"></td><td>)</td>
          <td>: ?ArrayList&lt;String&gt; </td>
        </tr>
      </table>
</div><div class="memdoc">

<p>获取存储处理过程中的错误/警告信息的列表。 </p>
<dl class="section return"><dt>返回</dt><dd>相关列表或者 None </dd></dl>

</div>
</div>
<a id="ad4942105a923a7af6ad100aca2feebed" name="ad4942105a923a7af6ad100aca2feebed"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad4942105a923a7af6ad100aca2feebed">&#9670;&#160;</a></span>getDelay()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public func commonsNet.ntp.TimeInfo.getDelay </td>
          <td>(</td>
          <td class="paramtype"></td><td>)</td>
          <td>: Int64 </td>
        </tr>
      </table>
</div><div class="memdoc">

<p>获取往返网络延迟。 </p>
<dl class="section return"><dt>返回</dt><dd>延迟毫秒数 </dd></dl>

</div>
</div>
<a id="a86759e99c3af99504ec96df7ede1fd87" name="a86759e99c3af99504ec96df7ede1fd87"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a86759e99c3af99504ec96df7ede1fd87">&#9670;&#160;</a></span>getlocalAddress()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public func commonsNet.ntp.TimeInfo.getlocalAddress </td>
          <td>(</td>
          <td class="paramtype"></td><td>)</td>
          <td>: ?IPSocketAddress </td>
        </tr>
      </table>
</div><div class="memdoc">

<p>从消息数据报中获取本地主机地址（如果有） </p>
<dl class="section return"><dt>返回</dt><dd>如果可用，则返回本地主机地址，否则为 None </dd></dl>

</div>
</div>
<a id="a5b0733fd064f25cc728bec1701b155a5" name="a5b0733fd064f25cc728bec1701b155a5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5b0733fd064f25cc728bec1701b155a5">&#9670;&#160;</a></span>getMessage()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public func commonsNet.ntp.TimeInfo.getMessage </td>
          <td>(</td>
          <td class="paramtype"></td><td>)</td>
          <td>: <a class="el" href="classcommonsNet_1_1ntp_1_1NtpV3Packet.html">NtpV3Packet</a> </td>
        </tr>
      </table>
</div><div class="memdoc">

<p>获取 NTP 消息包。 </p>
<dl class="section return"><dt>返回</dt><dd>NTP 消息包 </dd></dl>

</div>
</div>
<a id="aa0bbeb50ff8cdbc30fb02a707b72f0a9" name="aa0bbeb50ff8cdbc30fb02a707b72f0a9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa0bbeb50ff8cdbc30fb02a707b72f0a9">&#9670;&#160;</a></span>getOffset()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public func commonsNet.ntp.TimeInfo.getOffset </td>
          <td>(</td>
          <td class="paramtype"></td><td>)</td>
          <td>: Int64 </td>
        </tr>
      </table>
</div><div class="memdoc">

<p>获取调整本地时钟以匹配远程时钟所需的时钟偏移量。 </p>
<dl class="section return"><dt>返回</dt><dd>偏移毫秒数 </dd></dl>

</div>
</div>
<a id="af1bf3861e46e81928538afe1eadf8aec" name="af1bf3861e46e81928538afe1eadf8aec"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af1bf3861e46e81928538afe1eadf8aec">&#9670;&#160;</a></span>getremoteAddress()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public func commonsNet.ntp.TimeInfo.getremoteAddress </td>
          <td>(</td>
          <td class="paramtype"></td><td>)</td>
          <td>: ?IPSocketAddress </td>
        </tr>
      </table>
</div><div class="memdoc">

<p>从消息数据报中获取远程主机地址（如果有） </p>
<dl class="section return"><dt>返回</dt><dd>如果可用，则返回远程主机地址，否则为 None </dd></dl>

</div>
</div>
<a id="ad90587d04e50fec0beb74d421bd699b9" name="ad90587d04e50fec0beb74d421bd699b9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad90587d04e50fec0beb74d421bd699b9">&#9670;&#160;</a></span>getReturnTime()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public func commonsNet.ntp.TimeInfo.getReturnTime </td>
          <td>(</td>
          <td class="paramtype"></td><td>)</td>
          <td>: Int64 </td>
        </tr>
      </table>
</div><div class="memdoc">

<p>返回本地机器接收到时间消息包的时间。 </p>
<dl class="section return"><dt>返回</dt><dd>数据包返回时间 </dd></dl>

</div>
</div>
<a id="a14ac543542bfbde8bfd4e8e39721775e" name="a14ac543542bfbde8bfd4e8e39721775e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a14ac543542bfbde8bfd4e8e39721775e">&#9670;&#160;</a></span>hashCode()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">public func commonsNet.ntp.TimeInfo.hashCode </td>
          <td>(</td>
          <td class="paramtype"></td><td>)</td>
          <td>: Int32 </td>
        </tr>
      </table>
</div><div class="memdoc">

<p>为此对象计算哈希码。结果是返回时间和消息哈希码的异或结果。 </p>
<dl class="section return"><dt>返回</dt><dd>此对象的哈希码值。 </dd></dl>

</div>
</div>
<h2 class="groupheader">类成员变量说明</h2>
<a id="a7567948cb327ea655fc4a25b180e9570" name="a7567948cb327ea655fc4a25b180e9570"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7567948cb327ea655fc4a25b180e9570">&#9670;&#160;</a></span>let message</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">commonsNet.ntp.TimeInfo.let message : <a class="el" href="classcommonsNet_1_1ntp_1_1NtpV3Packet.html">NtpV3Packet</a></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>NTP 消息包。 </p>

</div>
</div>
<a id="a12a3795e895fe22e9c44b54fa9281504" name="a12a3795e895fe22e9c44b54fa9281504"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a12a3795e895fe22e9c44b54fa9281504">&#9670;&#160;</a></span>let returnTimeMillis</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">commonsNet.ntp.TimeInfo.let returnTimeMillis : Int64</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>本地机器接收到时间消息包的时间。 </p>

</div>
</div>
<a id="ae1de23ad09470ca0b05942db8b349452" name="ae1de23ad09470ca0b05942db8b349452"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae1de23ad09470ca0b05942db8b349452">&#9670;&#160;</a></span>var comments</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">commonsNet.ntp.TimeInfo.var comments : ?ArrayList&lt;String&gt;</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>存储处理过程中的错误/警告信息的列表。 </p>

</div>
</div>
<a id="aeb19bb9c73ae38927cc229822ad412c3" name="aeb19bb9c73ae38927cc229822ad412c3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aeb19bb9c73ae38927cc229822ad412c3">&#9670;&#160;</a></span>var delayMillis</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">commonsNet.ntp.TimeInfo.var delayMillis : Int64</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>延迟毫秒数。 </p>

</div>
</div>
<a id="ac95f21d3a6452a13dbce9cee3874069f" name="ac95f21d3a6452a13dbce9cee3874069f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac95f21d3a6452a13dbce9cee3874069f">&#9670;&#160;</a></span>var detailsComputed</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">commonsNet.ntp.TimeInfo.var detailsComputed : Bool = false</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>标志位，表示 TimeInfo 的详细信息是否已处理并计算出延迟/偏移值 </p>

</div>
</div>
<a id="a30626b35429ced55563e9eb6adcc4689" name="a30626b35429ced55563e9eb6adcc4689"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a30626b35429ced55563e9eb6adcc4689">&#9670;&#160;</a></span>var offsetMillis</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">commonsNet.ntp.TimeInfo.var offsetMillis : Int64</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>偏移毫秒数。 </p>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>src/ntp/<a class="el" href="time__info_8cj.html">time_info.cj</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.9.6-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespacecommonsNet.html">commonsNet</a></li><li class="navelem"><a class="el" href="namespacecommonsNet_1_1ntp.html">ntp</a></li><li class="navelem"><a class="el" href="classcommonsNet_1_1ntp_1_1TimeInfo.html">TimeInfo</a></li>
    <li class="footer">制作者 <img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
  </ul>
</div>
</body>
</html>
